import {createRouter, createWebHistory} from 'vue-router'


const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [

        {path: '/login', component: () => import('@/views/login/LoginPage.vue')},
        {
            path: '/',
            component: () => import('@/views/layout/LayoutPage.vue'),
            redirect: '/question',
            children: [
                {
                    path: '/question',
                    component: () => import('@/views/question/QuestionPage.vue'),
                },
                {
                    path: '/admin',
                    component: () => import('@/views/admin/QuestionManager.vue'),
                },
                {
                    path: '/user',
                    component: () => import('@/views/user/UserPage.vue')
                },
                {
                    path: '/rank',
                    component: () => import('@/views/question/QuestionRank.vue')
                },
                {path: '/questionInfo', component: () => import('@/views/question/QuestionShow.vue')}
            ]
        }

    ]
})
export default router
